// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 - {{year}} Pionix GmbH and Contributors to EVerest

#include <ocpp/v201/ctrlr_component_variables.hpp>

namespace ocpp {
namespace v201 {

namespace ControllerComponents {
{% for component in components %}
const Component& {{ component }} = {"{{ component }}"};
{% endfor %}
} // namespace ControllerComponents

namespace ControllerComponentVariables {

{% for variable in variables %}
const {% if variable.required %}Required{% endif %}ComponentVariable& {{variable.unique_variable_name}} = {
    ControllerComponents::{{ variable.component_name }},
    std::nullopt,
    std::optional<Variable>({ "{{ variable.variable_name }}",{% if variable.instance != "" %} std::nullopt, "{{ variable.instance }}" {% endif %}}),
};
{% endfor %}

} // namespace ComponentVariables
} // namespace ocpp
} // namespace v201

